//package com.alfred.common.spring.boot;
//
//import com.alfred.common.spring.boot.web.handler.GlobalExceptionHandler;
//import com.alfred.common.spring.boot.web.handler.GlobalResponseBodyHandler;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.DispatcherServlet;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) // TODO 芋艿，未来可能考虑 REACTIVE
//@ConditionalOnClass({DispatcherServlet.class, WebMvcConfigurer.class,// 有 Spring MVC 容器
//})
//public class UserMVCAutoConfiguration implements WebMvcConfigurer {
//
//    @Bean
//    @ConditionalOnMissingBean(GlobalExceptionHandler.class)
//    public GlobalExceptionHandler globalExceptionHandler() {
//        return new GlobalExceptionHandler();
//    }
//
//
//    @Bean
//    @ConditionalOnMissingBean(GlobalResponseBodyHandler.class)
//    public GlobalResponseBodyHandler globalResponseBodyHandler() {
//        return new GlobalResponseBodyHandler();
//    }
//}
